/* @flow */

import * as nodeOps from 'web/runtime/node-ops'
import { createPatchFunction } from 'core/vdom/patch'
import baseModules from 'core/vdom/modules/index'
import platformModules from 'web/runtime/modules/index'

// the directive module should be applied last, after all
// built-in modules have been applied.
// modules 拼接了 platformModules数组(平台模块 钩子函数) 和 baseModules(处理指令和res)
const modules = platformModules.concat(baseModules)
// createPathFunction是一个高阶函数 柯里化的函数
export const patch: Function = createPatchFunction({ nodeOps, modules })
